$(function(){
    $("#submit")[0].onclick = function(){
        var username=$("#username")[0].value
        var sex=[$("input[name=sex]")[0].value==1?'男':'女']
        var email=$("#email")[0].value
        var Idcard=$("#Idcard")[0].value
        var city=$("#city")[0].value
        var birthday=$("#birthday")[0].value
        $.ajax({
            url: "http://cqsxadmin.tianfu.space:8990/api/student/update",
            type: "put",
            cache: false,
            async: false,
            dataType: "json",
            contentType: "application/json",
            data: {
                body:{
                    City: city,
                    Sex: sex,
                    Username: username,
                    Email: email,
                    Idcard: Idcard,
                    Birthday: birthday
                }
            },
            success: function(data){
                console.log(data);
            }
        })
    }
})